/*
 * @Author: Kilims Ye
 * @Date: 2020-09-24 16:37:57
 * @LastEditTime: 2021-03-31 09:39:51
 * @LastEditors: Kilims Ye
 * @Description: 
 * @FilePath: /react-mobile-seeds/src/context/appContext.js
 */
import React, { useReducer } from "react";
import reducer from "./reducers/appReducers";

const initialState = {
  enumList: [],
};

const AppContext = React.createContext(initialState);

function AppProvider(props) {
  const [state, dispatch] = useReducer(reducer, initialState);
  return (
    <AppContext.Provider value={{ state, dispatch }}>{props.children}</AppContext.Provider>
  );
}
export { AppContext, AppProvider };
